package cn.wolfcode.luowowo.member.mapper;

import cn.wolfcode.luowowo.member.domain.UserInfo;
import cn.wolfcode.luowowo.member.vo.UserInfoVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface UserInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserInfo record);

    UserInfo selectByPrimaryKey(Long id);

    List<UserInfo> selectAll();

    int updateByPrimaryKey(UserInfo record);

    int selectCountByPhone(String phone);

    UserInfo selectUserByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    List<Long> selectFocusedUserInfo(Long userInfoId);

    int selectFocusedUserInfoCountById(Long userInfoId);

    int selectFansUserInfoCountById(Long userInfoId);

    String selectHoneyCountById(Long userInfoId);

    void updateUserInfoData(UserInfo userInfo);

    BigDecimal selectScore(Long userId);

    void payForItem(@Param("userId") Long userId, @Param("price") BigDecimal price);
}